/**
 *
 * App
 *
 * This component is the skeleton around the actual pages, and should only
 * contain code that should be seen on all pages. (e.g. navigation bar)
 */

import * as React from "react"
import { Helmet } from "react-helmet-async"
import { Switch, Route, BrowserRouter } from "react-router-dom"

import Login from "./pages/Login/index"
import Layout from "./pages/Layout/index"
import PrivateRoute from "app/components/PrivateRoute/index"

export function App() {
  return (
    <BrowserRouter>
      <Helmet
        titleTemplate="%s - React Boilerplate"
        defaultTitle="React Boilerplate"
        htmlAttributes={{ lang: "" }}
      >
        <meta name="description" content="A React Boilerplate application" />
      </Helmet>

      <Switch>
        <Route exact path="/index" component={Login} />
        <PrivateRoute path="/" component={Layout} />
      </Switch>
    </BrowserRouter>
  )
}
